<h1>Cosul dumneavoastra de cumparaturi:</h1>

<form action="<?php echo url_for('user/cumpara')?>" method="post"><table>
<?php $total=0; foreach($comenzi as $comanda): ?>
<?php $carte = Doctrine_Core::getTable('Carte')->find(array($comanda));?>
	<tr>
		<td><img src=<?php echo $carte->getPoza()?> width='70' height='100'></img></td>
		<td><?php echo $carte->getTitlu()?></td>
		<th align='left'><?php echo $carte->getPret(); ?></th>
		<td><a href='<?php echo url_for('user/deleteFromCos?id_carte='.$carte->getIdCarte())?>'>Sterge comanda</a></td>
	</tr>
	
	<?php $total += $carte->getPret(); ?>
	<?php endforeach; ?>
	<tr><th colspan='2' height = '40'>Total</th><th><?php echo $total ?></th></tr>
</table>
<input type="submit" value="Cumpara"/>
</form>